using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

using GalleryItem = McePicasa.GalleryItem;
using Microsoft.MediaCenter.UI;


namespace McePicasa
{
    /// <summary>
    /// An ApplicationExperience is one of the primary sections of the McePicasa 
    /// application.  It has a category in the main menu and a gallery page.
    /// </summary>
    public abstract class ApplicationExperience
    {
        /// <summary>
        /// A friendly name for this experience.
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        /// <summary>
        /// The id for this experience. This id is set by Application.
        /// Application ensures its uniqueness across all experiences.
        /// </summary>
        public int MyId
        {
            get { return myId; }
            set { myId = value; }
        }

        /// <summary>
        /// Create the main menu category entry for this experience.
        /// </summary>
        public abstract MenuCategory CreateMenuCategory();

        /// <summary>
        /// Return results for items that match the search string.
        /// </summary>
        public abstract IList<GalleryItem> SearchPhoto(ContentPage page, string value);
        public abstract IList<GalleryItem> SearchPhotoFlickr(ContentPage page, string value, long pageNumber);
        //public abstract IList<GalleryItem> SearchAlbum(ContentPage page, string value);

        /*
        // Define the API signature we will be calling and the constants we will be using
        [DllImport("shell32.dll")]
        static extern bool SHGetSpecialFolderPath(IntPtr hwndOwner, [Out] StringBuilder lpszPath, int nFolder, bool fCreate);
        private const int CSIDL_COMMON_VIDEO = 0x0037;
        private const int CSIDL_COMMON_MUSIC = 0x0035;
        */

        /// <summary>
        /// Location of the local data used by the different experiences.
        /// </summary>
        protected const string DataDirectory = @"\ProgramData\Microsoft\McePicasa\Data\";

        /// <summary>
        /// Location of the local images used by the different experiences.
        /// </summary>
        //protected const string ImagesDirectory = @"\ProgramData\Microsoft\McePicasa\Images\";
        //protected static string ProgramDirectory = Environment.GetEnvironmentVariable("ProgramFiles") + @"\McePicasa\";
        private string description;
        private int myId;
    }
}
